<h1>Listing materials</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Rules</th>
    <th>Desc</th>
  </tr>

<% for material in @materials %>
  <tr>
    <td><%=h material.name %></td>
    <td><%=h material.rules %></td>
    <td><%=h material.desc %></td>
    <td><%= link_to 'Show', material %></td>
    <td><%= link_to 'Edit', edit_material_path(material) %></td>
    <td><%= link_to 'Destroy', material, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New material', new_material_path %>
